using System;
using CKS.EBE.API;

namespace CKS.EBE.WebControls
{
    public class PostComments : SingleListQuery
    {
        protected override void OnInit(EventArgs e)
        {
            ListName = Localization.GetListName(Localization.BlogList.Comments, Web.Language);
            ViewFieldsXML = "<FieldRef Name='Title'/><FieldRef Name='_ModerationStatus'/><FieldRef Name='Created'/><FieldRef Name='CommentUrl'/><FieldRef Name='Body'/><FieldRef Name='PostTitle'/>";
            QueryXML = string.Format("<Where><And><Eq><FieldRef Name='_ModerationStatus'/><Value Type='Number'>0</Value></Eq><Eq><FieldRef Name='PostID'/><Value Type='Text'>{0}</Value></Eq></And></Where><OrderBy><FieldRef Name='Created' /></OrderBy>", Page.Request["id"]);

            base.OnInit(e);
        }
    }
}
